package cn.ht.JVM.classLoader;

/**
 * @author ht
 * @Description: 认识类加载器
 * @date 2020-5-4
 */
public class ClossLoaderDemo1 {

    public static void main(String[] args) {
        Object o = new Object();
        System.out.println(o.getClass().getClassLoader().getParent().getParent());
        System.out.println(o.getClass().getClassLoader().getParent());
        System.out.println(o.getClass().getClassLoader());
        System.out.println("--------------------------");
        ClossLoaderDemo1 demo1 = new ClossLoaderDemo1();
        System.out.println(demo1.getClass().getClassLoader().getParent().getParent());
        System.out.println(demo1.getClass().getClassLoader().getParent());
        System.out.println(demo1.getClass().getClassLoader());
    }
}
